package com.sky.task;


import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@Slf4j
public class HelloTask {

    /**
     * 定时任务
     */
    //@Scheduled(cron = "0/5 * * * * ?")
    public void test(){
        log.info("定时任务开始执行了...{}",new Date());
    }

    //@Scheduled(fixedRate = 2000)
    public void test1(){
        log.info("定时任务开始执行了...{}",new Date());
    }
}
